export class BaseCommand {
    escapeMessage(message: string) {
        return this.toMessageString(message)
            .replace('/\r/g', '%0D')
            .replace('/\n/g', '%0A')
            .replace('/%/g', '%25')
    }

    toMessageString(message: string) {
        if (message === null || message === undefined) {
            return ''
        }

        return message
    }
}
